/* Benchmarks for the PionterC verifier. */

// list visit

struct list
{
  int data;
  struct list* next;
};

/*@ let list(l) = (l==null) ||
  @                  ({{l}} && list(l->next))
  @ in  list(l)
  @ end
  @*/

int test(struct list* l)
{
  int sum;
  struct list* p;
  sum = 0;
  p = l;
  while (p!=null)
  {
    sum = sum + p->data;
  }
  return sum;
}
/*@ 
  @*/
